{% extends "base.html" %}
{% block menu %}
	
 <div class="navbar navbar-inverse navbar-fixed-top">
      <div class="navbar-inner">
        <div class="container">
          <button type="button" class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
          </button>
          <a class="brand" href="#">Project Manager System</a>
          <div class="nav-collapse collapse">
            <ul class="nav">
              <li><a href="/admproyecto/">Administrar Proyecto</a></li>
              <li class="active"><a href="/admfase/{{session['proyectoid']}}">Administrar Fase</a></li>
              <li><a href="/">Logout</a></li>
              <li><a href="#contact">Usuario: {{session['username']}}</a></li>
              </ul>
          </div>
       </div>
     </div>
</div>
{%endblock%}
{%block mensaje%}
{%endblock%}

{%block content%}
<div class="container">
	<h3>Crear Fase</h3>
	<hr>
	<p>Complete los datos de la fase:</p>
		<form action="{{url_for('crearfase')}}" method="post">
            <p>Nombre<small class="text-error">(*)</small>:
	            {%  with messages = get_flashed_messages(category_filter=["nombre"]) %}
		  			{% if messages %}
		  				{% for message in messages %}
	   						<small class="text-error">{{ message }}</small>	
	   					{% endfor %}    					
					{% endif %}
				{% endwith %}  
				<br/>          
            <input type="text" name="nombre" value="{{session['aux1']}}"/></p>
            <p>Numero<small class="text-error">(*)</small>:
	            {%  with messages = get_flashed_messages(category_filter=["numero"]) %}
		  			{% if messages %}
		  				{% for message in messages %}
	   						<small class="text-error">{{ message }}</small>	
	   					{% endfor %}    					
					{% endif %}
				{% endwith %}
				<br/>       
            <input type="number" name="numero" value="{{session['aux2']}}"/></p>
            <p>Fecha de inicio:
            	 {%  with messages = get_flashed_messages(category_filter=["fecha"]) %}
		  			{% if messages %}
		  				{% for message in messages %}
	   						<small class="text-error">{{ message }}</small>	
	   					{% endfor %}    					
					{% endif %}
				{% endwith %}
            <br/>
            <input type="date" name="fechainicio" value="{{session['aux3']}}"/><small class="text-info">(Por defecto la fecha actual)</small></p>
            <p>Fecha de fin:
            	{%  with messages = get_flashed_messages(category_filter=["fecha"]) %}
		  			{% if messages %}
		  				{% for message in messages %}
	   						<small class="text-error">{{ message }}</small>	
	   					{% endfor %}    					
					{% endif %}
				{% endwith %}
            <br/>
            <input type="date" name="fechafin" value="{{session['aux4']}}"/><small class="text-info">(Por defecto un plazo de 15 días)</small></p>
            <p><input class="btn btn-success" type="submit" value="Aceptar" />
            <a class="btn btn-inverse" href="/admfase/{{session['proyectoid']}}">Cancelar</a></p>
        </form>
</div>        
{%endblock%}

